package com.iob.coin.po;

/**
 * @Author: MengYuxin
 * @Date: 2021/3/9 22:42
 * 表示一个节点对象
 */
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Entity
@Table(name = "node")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Node {

    public Node(String nodeAtId,  int type_id, String label_ZH, int kgID, double x, double y,String color,double radius) {
        NodeAtId = nodeAtId;
        this.type_id=type_id;
        this.label_ZH = label_ZH;
        this.kgID = kgID;
        this.x = x;
        this.y = y;
        this.color=color;
        this.radius=radius;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "Id")
    private int id;    //数据库中的id

    //csv文件中的id(节点的标识id,在triple中对应的s_id和o_id)
    @Column(name = "node_at_id")
    private String NodeAtId;

    @Column(name = "type_id")
    private int type_id;

    @Column(name="label_ZH")
    private String label_ZH;

    @Column(name = "kgID")
    private int kgID;

    @Column(name = "x")
    private double x;

    @Column(name = "y")
    private double y;

    @Column(name = "color")
    private String color;

    @Column(name = "radius")
    private double radius;
}
